package com.quality.web.server.db;

import java.sql.SQLException;

import com.quality.web.server.misc.ServerLogger;

public class DaoUtil {

  public static void beginTransaction() throws SQLException {
    DaoConfig.getSqlMapClient().startTransaction();
  }

  public static void endTransaction() {
    try {
      DaoConfig.getSqlMapClient().endTransaction();
    } catch (SQLException e) {
      ServerLogger.error("Error ending transaction.", e);
    }
  }

  public static void commitTransaction() throws SQLException {
    DaoConfig.getSqlMapClient().commitTransaction();
  }
}
